<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('字典数据列表')" />
    <th:block th:include="include :: select2-css" />
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="data-form">
                <div class="select-list">
                    <ul>
                        <li>
                           <input type="text" name="id" id="id"  th:field="*{fee.id}" style="display: none"/>
                        </li>
                        <li>
                            <input type="text" name="productType" id="productType"  th:field="*{fee.productType}" style="display: none"/>
                        </li>
                        <li>
                            起始地：<select name="porCityFullNameCn" id="porCityFullNameCn" th:with="cityList=${@dict.getCityCN()}" disabled>
                            <option value="">所有</option>
                            <option th:each="city : ${cityList}" th:text="${city.CITY_FULL_NAME_CN}" th:value="${city.UUID}"  th:field="*{fee.porCityFullNameCn}"></option>
                        </select>
                        </li>
                        <li>
                            目的地：<select name="fndCityFullNameCn" id="fndCityFullNameCn" th:with="cityList=${@dict.getCity()}" disabled>
                            <option value="">所有</option>
                            <option th:each="city : ${cityList}" th:text="${city.CITY_FULL_NAME_EN}" th:value="${city.UUID}"  th:field="*{fee.fndCityFullNameCn}" ></option>
                        </select>
                        </li>
                        <li>
                            航程天数：<input type="text" name="estimatedTransitTimeInDays" id="estimatedTransitTimeInDays"  th:field="*{fee.estimatedTransitTimeInDays}" disabled/>
                        </li>
                        <li>
                            产品类型：<select disabled>
                            <option value="普通产品" th:field="*{fee.productType}">普通产品</option>
                            <option value="远期产品" th:field="*{fee.productType}">远期产品</option>
                        </select>
                        </li>
                    </ul>
                </div>
            </form>
        </div>

        <div class="btn-group-sm" id="toolbar" role="group">
            <a class="btn btn-warning" onclick="closeItem()">
                <i class="fa fa-reply-all"></i> 关闭
            </a>
        </div>

        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" />
<script th:inline="javascript">
    var prefix = ctx + "business/fee";

    $(function() {
        var options = {
            url: prefix + "/feeList",
            queryParams: queryParams,
            modalName: "数据",
            columns: [
                {
                    title: "序号",
                    formatter: function (value, row, index) {
                        return $.table.serialNumber(index);
                    }
                },
                {
                    field: 'chargeName',
                    title: '费用名称',
                    align: 'center',
                },
                {
                    field: 'chargeType',
                    title: '费用类型',
                    align: 'center',

                },
                {
                    field: 'unit',
                    title: '单位',
                    align: 'center',
                },
                {
                    field: 'price',
                    title: '单票价格',
                    align: 'center',
                },
                {
                    field: 'twentyGPPrice',
                    title: '20GP',
                    align: 'center',

                },
                {
                    field: 'fortyGPPrice',
                    title: '40GP',
                    align: 'center',
                },
                {
                    field: 'fortyHQPrice',
                    title: '40HQ',
                    align: 'center',
                },
                {
                    field: 'twentyRFPrice',
                    title: '20RF',
                    align: 'center',
                },
                {
                    field: 'fortyRQPrice',
                    title: '40RQ',
                    align: 'center',
                }]
        };
        $.table.init(options);
    });

    function queryParams(params) {
        var search = $.table.queryParams(params);
        search.productId = $("#id").val();
        return search;
    }

</script>
</body>
</html>